<template>
  <!-- 待执行 -->
  <div style="margin-left: 20px;">
    <el-button v-if="operationList.includes('project:startExecute')" @click="handzhixing">开始执行</el-button>
  </div>
</template>

<script>
import APIdetail from "@/api/apidetail";
export default {
  props:['operationList'],
  data() {
    return {projectId:null};
  },

  methods: {
    handzhixing() {
      let params = {
        projectId: this.projectId,
      };
      APIdetail.startExecute(params).then(res=>{
       if(res.key==1000){
        this.$message.success(res.message)
        this.$emit('get-stage')
       }
      })
    },
  },

  created() {
    let projectId = this.$ls.get("projectId");
    this.projectId = projectId;
  },
};
</script>
